﻿using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;


using System.Xml;
using System.Configuration;

using System.Text;
using System.Data.SqlClient;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using Cisoft.IntegrationSystem.BLL;


namespace WebSystem
{


    

    /// <summary>
    /// WebServiceforregister 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    
    //[System.Web.Script.Services.ScriptService]
    public class WebServiceforregister : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }


        [WebMethod(Description = "根据注册的登录名返回是否被占用")]
        public string CheckMemberLoginNameIsUse(string strMemberLoginName)
        {

            string result = "usingnow";  //被占用
            //StringBuilder strSql = new StringBuilder();
            //strSql.Append("select * from NT_Videos where");
            //strSql.Append(" VideosID='" + ID.ToString() + "'");
            Cisoft.IntegrationSystem.BLL.MemberBO bllMember=new Cisoft.IntegrationSystem.BLL.MemberBO();

            Cisoft.IntegrationSystem.BLL.UserBO bllUser = new Cisoft.IntegrationSystem.BLL.UserBO();


            bool blresult=false;    //数据库会员中未存在相应记录

            bool bluserresult = false;  //数据库管理员中未存在相应记录

            blresult=bllMember.CheckMemberLoginName(strMemberLoginName);

            bluserresult = bllUser.CheckUserLoginName(strMemberLoginName);


            if(!blresult&&!bluserresult)
            {
                result="canusing";
            }
            else
            {
                result = "usingnow";
            }





            return result;

           
        }





    }
}
